<?php

	/**
	* @author Robbie Vasquez
 	* @author Matt Kennedy
 	*/
	
class Listing extends Controller {

	public function Listing()
	{
		parent::Controller();
	}
	
	function index()
	{	
		$this->load->model('Sessions');
		
		$this->Sessions->logged_in();
	
		$this->load->model('Lister'); 
		
		$result = $this->Lister->listruns();
		
		$data = array();
		$data['result'] = $result;
		
		$this->load->view('listallruns', $data);
	}
	
	//creating function to list all the runs
	public function list_runs()
	{
		$this->load->model('Sessions');
		
		$this->Sessions->logged_in();
	
		$this->load->model('Lister'); 
		
		$result = $this->Lister->listruns();
		
		$data = array();
		$data['result'] = $result;
		
		$this->load->view('listallruns', $data);
	}
	
	//creating function to list all the routes
	public function listroutes()
	{
		$this->load->model('Sessions');
		
		$this->Sessions->logged_in(); 
	
		$this->load->model('Lister');
	
		$result = $this->Lister->list_routes();
	
		$data = array();
		$data['result'] = $result;
	
		$this->load->view('listallroutes', $data);
	}	
}